package com.neuedu.servlet.business;

import com.neuedu.service.BusinessService;
import com.neuedu.service.Imp.BusinessServiceImp;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


@WebServlet("/delBus")
public class DelBusinessServlet extends HttpServlet {
    private BusinessService businessService = new BusinessServiceImp();
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String id = req.getParameter("id");
        System.out.println(id);

        Integer i = businessService.delBus(id);

        resp.getWriter().write(i + "");
    }
}
